package cn.zd.demo1.util;

import java.util.List;

public class StringUtil {
    public static String listToString(List<? extends Object> userInfos) {
        if (userInfos == null || userInfos.size() == 0) {
            return "空数据";
        }
        StringBuffer sb = new StringBuffer("\n");
        userInfos.forEach(userInfo -> {
            sb.append(userInfo.toString()).append("\n");
        });
        return sb.toString();
    }
}
